﻿object FORM_SHITU: TFORM_SHITU
  Left = 0
  Top = 0
  Caption = #35270#22270
  ClientHeight = 553
  ClientWidth = 865
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  FormStyle = fsMDIChild
  OldCreateOrder = False
  Visible = True
  OnCreate = FormCreate
  OnResize = FormResize
  PixelsPerInch = 96
  TextHeight = 13
  object Splitter1: TSplitter
    Left = 677
    Top = 151
    Height = 402
    Align = alRight
    OnMoved = Splitter1Moved
    ExplicitLeft = 671
    ExplicitTop = 155
  end
  object Panel1: TPanel
    Left = 752
    Top = 216
    Width = 121
    Height = 385
    Caption = 'Panel1'
    TabOrder = 0
    Visible = False
    object GroupBox2: TGroupBox
      Left = -24
      Top = 32
      Width = 244
      Height = 481
      Caption = 'GroupBox2'
      TabOrder = 0
      object DBGrid1: TDBGrid
        Left = 2
        Top = 15
        Width = 240
        Height = 464
        Align = alClient
        DataSource = DataSource1
        ReadOnly = True
        TabOrder = 0
        TitleFont.Charset = DEFAULT_CHARSET
        TitleFont.Color = clWindowText
        TitleFont.Height = -11
        TitleFont.Name = 'Tahoma'
        TitleFont.Style = []
        OnTitleClick = DBGrid1TitleClick
        Columns = <
          item
            Expanded = False
            FieldName = #26102#38388
            Width = 80
            Visible = True
          end
          item
            Expanded = False
            FieldName = #33829#19994#39069
            Width = 50
            Visible = True
          end
          item
            Expanded = False
            FieldName = #24635#21033#28070
            Width = 50
            Visible = True
          end
          item
            Expanded = False
            FieldName = #24635#25104#26412
            Width = 50
            Visible = True
          end>
      end
    end
  end
  object GroupBox1: TGroupBox
    Left = 0
    Top = 0
    Width = 865
    Height = 151
    Align = alTop
    Caption = 'GroupBox1'
    TabOrder = 1
    object DBChart1: TDBChart
      Left = 585
      Top = 15
      Width = 278
      Height = 134
      Title.Text.Strings = (
        'TDBChart')
      View3D = False
      Align = alClient
      TabOrder = 0
      PrintMargins = (
        15
        41
        15
        41)
      object Series1: TLineSeries
        Marks.Arrow.Visible = True
        Marks.Callout.Brush.Color = clBlack
        Marks.Callout.Arrow.Visible = True
        Marks.Style = smsValue
        Marks.Visible = False
        DataSource = ADOQuery1
        Shadow.Color = clWhite
        Title = #33829#19994#39069
        XLabelsSource = #20986#36135#26102#38388
        Pointer.InflateMargins = True
        Pointer.Style = psRectangle
        Pointer.Visible = False
        XValues.Name = 'X'
        XValues.Order = loAscending
        YValues.Name = 'Y'
        YValues.Order = loNone
        YValues.ValueSource = #33829#19994#39069
      end
      object Series2: TLineSeries
        Marks.Arrow.Visible = True
        Marks.Callout.Brush.Color = clBlack
        Marks.Callout.Arrow.Visible = True
        Marks.Style = smsValue
        Marks.Visible = False
        DataSource = ADOQuery2
        Title = #25104#26412
        XLabelsSource = #20986#36135#26102#38388
        Pointer.InflateMargins = True
        Pointer.Style = psRectangle
        Pointer.Visible = False
        XValues.Name = 'X'
        XValues.Order = loAscending
        YValues.Name = 'Y'
        YValues.Order = loNone
        YValues.ValueSource = #20170#22825#25104#26412
      end
      object Series3: TLineSeries
        Marks.Arrow.Visible = True
        Marks.Callout.Brush.Color = clBlack
        Marks.Callout.Arrow.Visible = True
        Marks.Style = smsValue
        Marks.Visible = False
        DataSource = ADOQuery3
        SeriesColor = 16744448
        Title = #21033#28070
        XLabelsSource = #20986#36135#26102#38388
        Pointer.InflateMargins = True
        Pointer.Style = psRectangle
        Pointer.Visible = False
        XValues.Name = 'X'
        XValues.Order = loAscending
        YValues.Name = 'Y'
        YValues.Order = loNone
        YValues.ValueSource = #20170#22825#21033#28070
      end
    end
    object Panel2: TPanel
      Left = 2
      Top = 15
      Width = 288
      Height = 134
      Align = alLeft
      TabOrder = 1
      object Label2: TLabel
        Left = 13
        Top = 76
        Width = 60
        Height = 13
        Caption = #32467#26463#26085#26399#65306
      end
      object Label1: TLabel
        Left = 13
        Top = 36
        Width = 60
        Height = 13
        Caption = #36215#22987#26085#26399#65306
      end
      object Button1: TButton
        Left = 56
        Top = 105
        Width = 75
        Height = 25
        Caption = #30830#23450
        TabOrder = 0
        OnClick = Button1Click
      end
      object DateTimePicker2: TDateTimePicker
        Left = 79
        Top = 68
        Width = 186
        Height = 21
        Date = 41338.522999247680000000
        Format = 'yyyy-MM-dd'
        Time = 41338.522999247680000000
        TabOrder = 1
      end
      object DateTimePicker1: TDateTimePicker
        Left = 79
        Top = 28
        Width = 186
        Height = 21
        Date = 41338.521200439810000000
        Format = 'yyyy-MM-dd'
        Time = 41338.521200439810000000
        TabOrder = 2
      end
      object Button2: TButton
        Left = 168
        Top = 105
        Width = 75
        Height = 25
        Caption = #32553#23567
        TabOrder = 3
      end
    end
    object Panel3: TPanel
      Left = 290
      Top = 15
      Width = 295
      Height = 134
      Align = alLeft
      TabOrder = 2
      object DBText1: TDBText
        Left = 80
        Top = 34
        Width = 65
        Height = 17
        DataField = #24635#33829#19994#39069
        DataSource = DataSource5
      end
      object DBText2: TDBText
        Left = 80
        Top = 57
        Width = 65
        Height = 17
        DataSource = DataSource5
      end
      object DBText3: TDBText
        Left = 80
        Top = 80
        Width = 65
        Height = 17
        DataSource = DataSource5
      end
      object Label3: TLabel
        Left = 16
        Top = 33
        Width = 48
        Height = 13
        Caption = #33829#19994#39069#65306
      end
      object Label4: TLabel
        Left = 16
        Top = 57
        Width = 36
        Height = 13
        Caption = #21033#28070#65306
      end
      object Label5: TLabel
        Left = 16
        Top = 80
        Width = 36
        Height = 13
        Caption = #25104#26412#65306
      end
      object GroupBox3: TGroupBox
        Left = 216
        Top = 1
        Width = 78
        Height = 132
        Align = alRight
        Caption = #25490#21015
        TabOrder = 0
        object RadioButton1: TRadioButton
          Left = 3
          Top = 14
          Width = 52
          Height = 17
          Caption = #26102#38388
          TabOrder = 0
        end
        object RadioButton2: TRadioButton
          Left = 3
          Top = 37
          Width = 113
          Height = 17
          Caption = #33829#19994#39069
          TabOrder = 1
        end
        object RadioButton3: TRadioButton
          Left = 3
          Top = 60
          Width = 113
          Height = 17
          Caption = #21033#28070
          TabOrder = 2
        end
        object RadioButton4: TRadioButton
          Left = 3
          Top = 83
          Width = 113
          Height = 17
          Caption = #25104#26412
          TabOrder = 3
        end
        object CheckBox1: TCheckBox
          Left = 3
          Top = 106
          Width = 97
          Height = 17
          Caption = #20498#24207#25490#21015
          TabOrder = 4
        end
      end
    end
  end
  object DBGrid2: TDBGrid
    Left = 128
    Top = 272
    Width = 456
    Height = 217
    DataSource = DataSource5
    TabOrder = 2
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'Tahoma'
    TitleFont.Style = []
    Visible = False
  end
  object Panel4: TPanel
    Left = 0
    Top = 151
    Width = 677
    Height = 402
    Align = alClient
    Caption = 'Panel4'
    TabOrder = 3
    object StringGrid1: TStringGrid
      Left = 1
      Top = 1
      Width = 675
      Height = 400
      Align = alClient
      ColCount = 11
      DefaultRowHeight = 22
      FixedCols = 0
      RowCount = 22
      TabOrder = 0
    end
  end
  object Panel5: TPanel
    Left = 680
    Top = 151
    Width = 185
    Height = 402
    Align = alRight
    Caption = 'Panel5'
    TabOrder = 4
    object StringGrid2: TStringGrid
      Left = 1
      Top = 1
      Width = 183
      Height = 400
      Align = alClient
      ColCount = 2
      FixedCols = 0
      RowCount = 20
      TabOrder = 0
      ColWidths = (
        82
        72)
      RowHeights = (
        24
        24
        24
        24
        24
        24
        24
        24
        24
        24
        24
        24
        24
        24
        24
        24
        24
        24
        24
        24)
    end
  end
  object ADOQuery1: TADOQuery
    Connection = MainForm.ADOConnection1
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      
        'select outdata.'#20986#36135#26102#38388' , sum('#21806#20215') as '#33829#19994#39069' from outdata GROUP BY outda' +
        'ta.'#20986#36135#26102#38388)
    Left = 736
    Top = 352
  end
  object ADOQuery2: TADOQuery
    Connection = MainForm.ADOConnection1
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'select '#20986#36135#26102#38388' , sum('#25104#26412') as '#20170#22825#25104#26412' from'
      
        '(select A.'#20986#36135#26102#38388',A.'#21830#21697#21517#31216',A.'#25968#37327',A.'#21806#20215',B.'#25104#26412',A.'#21806#20215'-iif(isnull(B.'#25104#26412'),0,B.'#25104 +
        #26412')*A.'#25968#37327' as '#21033#28070' '
      'FROM (select * from outdata) as A  '
      'left join '
      '(select '#21830#21697#21517#31216',MAX('#36827#36135#20215') as '#25104#26412' from indata group by '#21830#21697#21517#31216') as B  '
      'on A.'#21830#21697#21517#31216'=B.'#21830#21697#21517#31216'  '
      'order by '#20986#36135#26102#38388')'
      'GROUP BY '#20986#36135#26102#38388)
    Left = 736
    Top = 408
  end
  object ADOQuery3: TADOQuery
    Connection = MainForm.ADOConnection1
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'select '#20986#36135#26102#38388' , sum('#21033#28070') as '#20170#22825#21033#28070' from'
      
        '(select A.'#20986#36135#26102#38388',A.'#21830#21697#21517#31216',A.'#25968#37327',A.'#21806#20215',B.'#25104#26412',A.'#21806#20215'-iif(isnull(B.'#25104#26412'),0,B.'#25104 +
        #26412')*A.'#25968#37327' as '#21033#28070' '
      'FROM (select * from outdata) as A  '
      'left join '
      '(select '#21830#21697#21517#31216',MAX('#36827#36135#20215') as '#25104#26412' from indata group by '#21830#21697#21517#31216') as B  '
      'on A.'#21830#21697#21517#31216'=B.'#21830#21697#21517#31216'  '
      'order by '#20986#36135#26102#38388')'
      'GROUP BY '#20986#36135#26102#38388)
    Left = 736
    Top = 472
  end
  object DBCrossTabSource1: TDBCrossTabSource
    DataSet = ADOQuery1
    GroupField = #33829#19994#39069
    LabelField = #20986#36135#26102#38388
    Left = 440
    Top = 584
  end
  object DataSource1: TDataSource
    DataSet = ADOQuery4
    Left = 624
    Top = 456
  end
  object ADOQuery4: TADOQuery
    Connection = MainForm.ADOConnection1
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      
        'select '#20986#36135#26102#38388' as '#26102#38388' , sum('#21806#20215') as '#33829#19994#39069' , sum('#21033#28070') as '#24635#21033#28070' , sum('#25104#26412') as' +
        ' '#24635#25104#26412'  from'
      
        '(select A.'#20986#36135#26102#38388',A.'#21830#21697#21517#31216',A.'#25968#37327',A.'#21806#20215',B.'#25104#26412' * A.'#25968#37327' as '#25104#26412',A.'#21806#20215'-iif(isnul' +
        'l(B.'#25104#26412'),0,B.'#25104#26412')*A.'#25968#37327' as '#21033#28070' '
      'FROM (select * from outdata) as A  '
      'left join '
      '(select '#21830#21697#21517#31216',MAX('#36827#36135#20215') as '#25104#26412' from indata group by '#21830#21697#21517#31216') as B  '
      'on A.'#21830#21697#21517#31216'=B.'#21830#21697#21517#31216'  '
      'order by '#20986#36135#26102#38388')'
      'GROUP BY '#20986#36135#26102#38388)
    Left = 736
    Top = 536
  end
  object ADODataSet1: TADODataSet
    Connection = MainForm.ADOConnection1
    CursorType = ctStatic
    CommandText = 
      'select '#20986#36135#26102#38388' as '#26102#38388' , sum('#21806#20215') as '#33829#19994#39069' , sum('#21033#28070') as '#24635#21033#28070' , sum('#25104#26412') as' +
      ' '#24635#25104#26412'  from'#13#10'(select A.'#20986#36135#26102#38388',A.'#21830#21697#21517#31216',A.'#25968#37327',A.'#21806#20215',B.'#25104#26412',A.'#21806#20215'-iif(isnull' +
      '(B.'#25104#26412'),0,B.'#25104#26412')*A.'#25968#37327' as '#21033#28070' '#13#10'FROM (select * from outdata) as A  '#13 +
      #10'left join '#13#10'(select '#21830#21697#21517#31216',MAX('#36827#36135#20215') as '#25104#26412' from indata group by '#21830#21697 +
      #21517#31216') as B  '#13#10'on A.'#21830#21697#21517#31216'=B.'#21830#21697#21517#31216'  '#13#10'order by '#20986#36135#26102#38388')'#13#10'GROUP BY '#20986#36135#26102#38388#13#10
    FieldDefs = <
      item
        Name = #26102#38388
        DataType = ftWideString
        Size = 50
      end
      item
        Name = #33829#19994#39069
        Attributes = [faFixed]
        DataType = ftFloat
      end
      item
        Name = #24635#21033#28070
        Attributes = [faFixed]
        DataType = ftFloat
      end
      item
        Name = #24635#25104#26412
        Attributes = [faFixed]
        DataType = ftFloat
      end>
    Parameters = <>
    StoreDefs = True
    Left = 456
    Top = 456
    object ADODataSet1时间: TWideStringField
      DisplayWidth = 27
      FieldName = #26102#38388
      Size = 50
    end
    object ADODataSet1营业额: TFloatField
      DisplayWidth = 12
      FieldName = #33829#19994#39069
    end
    object ADODataSet1总利润: TFloatField
      DisplayWidth = 12
      FieldName = #24635#21033#28070
    end
    object ADODataSet1总成本: TFloatField
      DisplayWidth = 12
      FieldName = #24635#25104#26412
    end
  end
  object DataSource2: TDataSource
    DataSet = ClientDataSet1
    Left = 624
    Top = 512
  end
  object ClientDataSet1: TClientDataSet
    Aggregates = <
      item
        Active = True
        Visible = False
      end>
    AggregatesActive = True
    Filtered = True
    FieldDefs = <
      item
        Name = #26102#38388
        DataType = ftWideString
        Size = 50
      end
      item
        Name = #33829#19994#39069
        DataType = ftFloat
      end
      item
        Name = #24635#21033#28070
        DataType = ftFloat
      end
      item
        Name = #24635#25104#26412
        DataType = ftFloat
      end>
    IndexDefs = <
      item
        Name = 'ClientDataSet1Index1'
      end>
    Params = <>
    ProviderName = 'DataSetProvider1'
    StoreDefs = True
    Left = 512
    Top = 376
    object ClientDataSet1时间: TWideStringField
      DisplayWidth = 31
      FieldName = #26102#38388
      Size = 50
    end
    object ClientDataSet1营业额: TFloatField
      DisplayWidth = 12
      FieldName = #33829#19994#39069
    end
    object ClientDataSet1总利润: TFloatField
      DisplayWidth = 12
      FieldName = #24635#21033#28070
    end
    object ClientDataSet1总成本: TFloatField
      DisplayWidth = 12
      FieldName = #24635#25104#26412
    end
    object ClientDataSet1总营业额: TAggregateField
      FieldName = #24635#33829#19994#39069
      Active = True
      Expression = 'sum('#33829#19994#39069')'
    end
  end
  object DataSource3: TDataSource
    DataSet = ClientDataSet1
    Left = 624
    Top = 568
  end
  object DataSource4: TDataSource
    DataSet = ClientDataSet1
    Left = 632
    Top = 616
  end
  object DataSource5: TDataSource
    DataSet = ClientDataSet1
    Left = 296
    Top = 464
  end
  object DataSetProvider1: TDataSetProvider
    DataSet = ADODataSet1
    Left = 416
    Top = 376
  end
  object ADOQuery5: TADOQuery
    Connection = MainForm.ADOConnection1
    Parameters = <>
    Left = 736
    Top = 280
  end
end
